package org.dsun.mvc.entity;

import java.io.IOException;

import javax.servlet.FilterChain;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class WebPageResult implements Result {
	
	private String page;
	
	@Override
	public void afterAction(Object action,HttpServletRequest request,HttpServletResponse response,FilterChain chain){
		RequestDispatcher rd=request.getRequestDispatcher(page);
		try {
			rd.forward(request, response);
		} catch (ServletException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public String getPage() {
		return page;
	}
	public void setPage(String page) {
		this.page = page;
	}
	
}
